package com.ftg.learn.bus.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ftg.learn.bus.entity.Log;
import com.ftg.learn.bus.mapper.LogMapper;
import com.ftg.learn.bus.service.ILogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 操作记录表 服务实现类
 * </p>
 *
 * @author lalala
 * @since 2022-03-07
 */
@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, Log> implements ILogService {

    @Resource
    LogMapper logMapper;

    /**
     * 添加日志
     * @param lname
     * @param operations
     * @param nameid
     * @param operator
     */
    @Override
    public void addLog(String lname, String operations,Long nameid,String operator) {
        logMapper.addLog(lname, operations,nameid,operator);
    }

    /**
     * 模糊查询
     * @param lname 操作名称
     * @return
     */
    @Override
    public List<Log> showLog(String lname, Page<Log> page) {
        return logMapper.showLog(lname,page);
    }


}
